package pers.qtong.tank.strategy;

import pers.qtong.tank.Bullet;
import pers.qtong.tank.Tank;

import java.io.Serializable;

public class DefaultFireStrategy implements FireStrategy, Serializable {
    @Override
    public void fire(Tank tank) {
        int bx = tank.getX() + Tank.WIDTH / 2 - Bullet.width / 2;
        int by = tank.getY() + Tank.HEIGHT / 2 - Bullet.height / 2;
        new Bullet(bx, by, tank.getDir(), tank.getGroup());
    }
}
